<template>
  <el-date-picker
    :type="type"
    :shortcuts="datepick_shortcuts"
    :valueFormat="valueFormat"
    start-placeholder="开始日期"
    end-placeholder="结束日期"
    v-bind="$attrs"
    style="width: 100%"
  />
</template>

<script setup lang="ts">
import { DatePickType } from 'element-plus'
import { datepick_shortcuts } from '@/utils/dateUtil'

defineProps({
  type: {
    type: String as () => DatePickType,
    default: 'daterange'
  },
  valueFormat: {
    type: String,
    default: 'YYYY-MM-DD'
  }
})
</script>
